﻿using Logistics.Car;
using Microsoft.AspNetCore.Mvc;
using System;

namespace Logistics.Web.Controllers
{
    public class BaiduMapController : Controller
    {
        private readonly ILineAppService _VehicleAppService;
        public BaiduMapController(ILineAppService VehicleAppService)
        {
            _VehicleAppService = VehicleAppService;
        }
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult Search()
        {
            return View();
        }
        public IActionResult AutoRun()
        {
            return View();
        }
        public IActionResult GetLine()
        {
            var getFoodListDto = new GetLineDto
            {
                SkipCount = 0,
                MaxResultCount = 10,
                Sorting = "Id"
            };
            var foods = _VehicleAppService.GetListAsync(getFoodListDto).Result;
            return Ok(foods);
        }
        public IActionResult GetL(int Id)
        {
            var list= _VehicleAppService.GetLong(Id).Result;
            return Ok(list);
        }
    }
}
